home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-01-14 | 3.2 KB | 110 lines | [TEXT/CWIE] |
- ///--------------------------------------------------------------------------------------
- // Blit8BitRotatedPixie.h
- //
- // Description: This is the include file for all the BlitPixie source files.
- ///--------------------------------------------------------------------------------------
-
-
- #ifndef __BLITROTATEDPIXIE__
- #define __BLITROTATEDPIXIE__
-
- #ifndef __BLITPIXIE__
- #include "BlitPixie.h"
- #endif
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- ///--------------------------------------------------------------------------------------
- // Public API
- ///--------------------------------------------------------------------------------------
- SW_FUNC OSErr CreateRotatedFrameFromFrame(
- SpriteWorldPtr destSpriteWorld,
- FramePtr originalFrameP,
- FramePtr* newFramePPtr,
- int amountOfRotation);
-
- SW_FUNC OSErr SWSetSpriteRotation(
- SpritePtr srcSpriteP,
- unsigned char rotation);
- SW_FUNC unsigned char SWGetSpriteRotation(SpritePtr srcSpriteP);
-
- ///--------------------------------------------------------------------------------------
- // Function prototypes for Rotation helpers
- ///--------------------------------------------------------------------------------------
-
- // if using 8, 16, 32, or 64 for this, we have precomputed these arrays in the code
- #define kNumberOfRotationSteps 32
- // if not uncomment this next line and make sure to call InitializeRotationTables()
- // to initialize these tables
- //#define DYNAMICALLY_GENERATE_TABLE
-
- extern double sineArray[kNumberOfRotationSteps];
- extern double cosineArray[kNumberOfRotationSteps];
- extern Boolean gRotationInitialized;
-
- void InitializeRotationTables(void);
-
- ///--------------------------------------------------------------------------------------
- // Function prototypes for 8-bit Rotated blitters
- ///--------------------------------------------------------------------------------------
-
- SW_FUNC void BlitPixieRotateFrame8Bit(
- FramePtr srcFrameP,
- FramePtr dstFrameP,
- Rect *srcRectP,
- Rect *dstRectP,
- short rotation);
-
- SW_FUNC void BlitPixie8BitRotatedMaskDrawProc(
- FramePtr srcFrameP,
- FramePtr dstFrameP,
- Rect *srcRect,
- Rect *dstRect);
-
- void BlitPixieMask8BitRotated(
- register unsigned char *srcPixelP,
- register unsigned char *dstPixelP,
- register unsigned char *maskPixelP,
- register unsigned long rowsToCopy,
- register unsigned long numBytesPerRow,
- register unsigned long srcOffset,
- register unsigned long dstOffset,
- register unsigned long curRotation);
-
- ///--------------------------------------------------------------------------------------
- // Function prototypes for 16-bit Rotated blitters
- ///--------------------------------------------------------------------------------------
-
- SW_FUNC void BlitPixieRotateFrame16Bit(
- FramePtr srcFrameP,
- FramePtr dstFrameP,
- Rect *srcRectP,
- Rect *dstRectP,
- short rotation);
-
- SW_FUNC void BlitPixie16BitRotatedMaskDrawProc(
- FramePtr srcFrameP,
- FramePtr dstFrameP,
- Rect *srcRect,
- Rect *dstRect);
-
- void BlitPixieMask16BitRotated(
- register unsigned short *srcPixelP,
- register unsigned short *dstPixelP,
- register unsigned short *maskPixelP,
- register unsigned long rowsToCopy,
- register unsigned long numBytesPerRow,
- register unsigned long srcOffset,
- register unsigned long dstOffset,
- register unsigned long curRotation);
-
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __BLITROTATEDPIXIE__ */
-